import {getCfsCodeOptions, getCompanyCodeOptions} from "@/api/options/options";

export default {
  data() {
    return {
      // 作业码头的options
      companyCodeOptions: [],
      // 作业点的options
      cfsCodeOptions: [],
    };
  },
  methods: {
    /**
     * 获取作业码头的options
     */
    async getCompanyCodeOptions() {
      const response = await getCompanyCodeOptions();
      this.companyCodeOptions = response.data;
    },
    /**
     * 获取作业点的options
     */
    async getCfsCodeOptions() {
      const response = await getCfsCodeOptions();
      this.cfsCodeOptions = response.data;
    },
  },
  created() {
    // 获取作业码头的options
    this.getCompanyCodeOptions();
    // 获取作业点的options
    this.getCfsCodeOptions();
  },
};
